import 'package:json_annotation/json_annotation.dart';
import 'package:reabampos/src/reabam/operation/bean/base/rb_response.dart';

//定义生成的文件 flutter pub run build_runner build --delete-conflicting-outputs
part 'request_user_info.g.dart';



@JsonSerializable(explicitToJson: true,includeIfNull: false)
class LoginInfoResponse extends RBBaseResponse{

   String? tokenId;

   String? serverAddress;  //商贸城服务器地址
   String? coursePath;  //商家教程地址
   String? userStatus;  //认证状态  E 未认证  W 认证中 Y 已认证  N 认证不通过
   String? companyName;  //商户名称
   String? groupName;  //商贸城名称

   String? userType;  //用户类型编码
   String? userTypeName;  //用户类型编码
   String? userCode;  //手机账号
   String? userName;  //用户姓名

   String? groupId;  //商贸城ID
   String? companyId;  //商户ID
   dynamic companyQty; // 门店数量

   String? headImage;
   dynamic himgHeigh;
   dynamic himgWidth;
   String? headImageUrl;

   dynamic sex;

   dynamic longitude;  //商贸城所在地的经度
   dynamic latitude;   //商贸城所在地的纬度

   Bean_retailConfig? retailConfig;


   LoginInfoResponse(
   {this.tokenId,
     this.serverAddress,
     this.coursePath,
     this.userStatus,
     this.companyName,
     this.groupName,
     this.userType,
     this.userTypeName,
     this.userCode,
     this.userName,
     this.groupId,
     this.companyId,
     this.companyQty,
     this.headImage,
     this.himgHeigh,
     this.himgWidth,
     this.headImageUrl,
     this.sex,
     this.longitude,
     this.latitude,
     this.retailConfig});

  factory LoginInfoResponse.fromJson(Map<String, dynamic> json) => _$LoginInfoResponseFromJson(json);
  Map<String, dynamic> toJson() => _$LoginInfoResponseToJson(this);

}

@JsonSerializable(explicitToJson: true,includeIfNull: false)
class Bean_retailConfig {

   dynamic retailStockLockEnable;
   dynamic cancelReasonsEnable; // 取消、退款原因启用
   dynamic refundReasonsEnable; // 退货原因启用
   dynamic notPayPendOrder;
   dynamic notPayOrder;
   dynamic partPayPendOrder; //  是否开启部分收银订单不允许交班
   dynamic notMealOrder; //  是否开启未出餐的订单不允许交班
   Bean_configRetailOrder? configRetailOrder;


   Bean_retailConfig(
   {this.retailStockLockEnable=0,
     this.cancelReasonsEnable=0,
     this.refundReasonsEnable=0,
     this.notPayPendOrder=0,
     this.notPayOrder=0,
     this.partPayPendOrder=0,
     this.notMealOrder=0,
     this.configRetailOrder});

  factory Bean_retailConfig.fromJson(Map<String, dynamic> json) => _$Bean_retailConfigFromJson(json);
  Map<String, dynamic> toJson() => _$Bean_retailConfigToJson(this);

}

@JsonSerializable(explicitToJson: true,includeIfNull: false)
class Bean_configRetailOrder {

   bool orderPostingDateModifiable=false; // 新增零售订单界面显示过账日期
   bool refundPostingDateModifiable=false;

   Bean_configRetailOrder({this.orderPostingDateModifiable=false,
     this.refundPostingDateModifiable=false}); // 新增零售退货单界面显示过账日期


  factory Bean_configRetailOrder.fromJson(Map<String, dynamic> json) => _$Bean_configRetailOrderFromJson(json);
  Map<String, dynamic> toJson() => _$Bean_configRetailOrderToJson(this);

}